package cn.gjculture.shopping.api.dao;

import cn.gjculture.shopping.api.entity.Authority;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AuthorityDao {

    @Select("select * from authority")
    List<Authority> query();


    @Insert("insert into authority(authorityId,authorityName,insertTime,updateTime,status) " +
            "values(#{authorityId},#{authorityName},#{insertTime},#{updateTime},#{status})")
    int insert(Authority authority);

    @Select("select * from authority where authorityId=#{authorityId}")
    Authority queryById(String authorityId);
}
